/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.gebze;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.gebze.param.ServerCommands;

/**
 *
 * @author Özcan ÇAĞIRICI <ozcanca@gebze.bel.tr>
 */
public class GbzWebScannerTool {

    private GbzBase program;

    public GbzWebScannerTool(ServerCommands runAsWhat) throws IOException {
        switch (runAsWhat) {
            case RUN_PROGRAM_AS_SERVER:
                //Programı Server Modunda Başlat.
                program = new GbzServer();
                program.start();
                break;
            case RUN_PROGRAM_AS_CLIENT:
            default:
                try {
                    //Programı Client Modunda Başlat.
                    program = new GbzClient();
                } catch (Exception ex) {
                    Logger.getLogger(GbzWebScannerTool.class.getName()).log(Level.SEVERE, null, ex);
                }
                program.start();
                break;
        }
    }
}
